cmake_minimum_required(VERSION 3.5)

project(admin_dialog LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(Qt5 5.15 COMPONENTS Widgets REQUIRED)

set(CMAKE_AUTOMOC ON)

# 添加与QtKeyboard相同的宏定义
add_definitions(-DENABLED_CHINESE_LIB -DENABLED_CHINESE_PHRASE_LIB -DENABLED_GOOGLE_CHINESE_LIB)

add_library(admin_dialog SHARED
    src/admin_dialog.cpp
    include/admin_dialog.h
)

target_include_directories(admin_dialog PUBLIC 
    include
    ${CMAKE_SOURCE_DIR}/qt_keyboard 
)

target_link_libraries(admin_dialog Qt5::Widgets qt_keyboard info_dialog)